/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.duduso.conferencia_claro_desktop.components;

import java.awt.Color;
import java.awt.Container;
import javax.swing.JInternalFrame;
import javax.swing.JTabbedPane;
import javax.swing.plaf.basic.BasicInternalFrameUI;

/**
 *
 * @author duduso
 */
public class FrameInterno extends JInternalFrame{

    public FrameInterno() {
            setVisible(true);
            setBackground(new Color(193, 205, 205));
            setBorder(null);
            moveToFront();
            setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
            ((BasicInternalFrameUI) this.getUI()).setNorthPane(null);
    }

    protected void fecharTab(){
            Container c = this.getParent();
            if(c != null && c instanceof JTabbedPane){
                    JTabbedPane tabPane = (JTabbedPane) c;
                    tabPane.remove(tabPane.getSelectedIndex());
            }
    }

}
